package infostroy.bookagolf.components.renderer;

import infostroy.bookagolf.components.inputs.GolfCheckBox;

import javax.swing.*;
import javax.swing.table.DefaultTableCellRenderer;
import java.awt.*;

/**
 * Created by Andrew on 27.02.14.
 */
public class GolfCheckBoxCellRenderer extends DefaultTableCellRenderer {
    @Override
    public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
        GolfCheckBox checkBox = new GolfCheckBox();
        Boolean checkValue = (Boolean) value;
        checkBox.setSelected(checkValue);
        return checkBox;
    }
}
